<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDynamicListsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('dynamic_lists', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->nullable()->comment('用户');
            $table->string('title')->default('')->comment('标题');
            $table->string('tag_ids')->default('')->comment('标签');
            $table->string('media_files')->default('')->comment('图片/视频');
            $table->tinyInteger('visible_range')->default('0')->comment('可见范围');
            $table->tinyInteger('status')->default('1')->comment('状态');
            $table->integer('praise_num')->default('0')->comment('点赞数');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('dynamic_lists');
    }
}
